package org.ccay.security.vo;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.ccay.core.base.KeyValuePairVO;

public class UserVO {
	/**
	 * 主键
	 */
	private Long id;

	/**
	 * 登录的用户名及权限框架使用的用户名
	 */
	private String name;
	/**
	 * 显示名称--通常为业务相关的名称例如：工号
	 */
	private String displayName;
	
	/**
	 * email地址-用户收取邮件的地址
	 */
	private String email;
	/**
	 * 电话-用户收取短信的电话
	 */
	private String phone;
	
	/**
	 * <p>失效日期</p>
	 * 权限的失效日期
	 */
	private Date expireDate;
	/**
	 * <p>enabled属性主要是为安全控制而设计的，主要用于用户的认证与授权</p>
	 * <p>
	 * {@link #getEnabled()}在属于如下情况之一时返回false：
	 * <ui>
	 * 	<li>当前系统时间大于expireDate时间</li>
	 *  <li>enabled 本身值为false</li>
	 *  <li>deleted 值为true</li>
	 * </ui>
	 * </p>
	 */
	private Boolean enabled;
	

	/**
	 * <p>deleted属性主要是业务逻辑设计，用于实现逻辑删除</p>
	 */
	private Boolean deleted;

	/**
	 * 角色id
	 */
	private Long roleId;
	
	/**
	 * 数据范围id
	 */
	private Long programId;
	
	/**
	 * 密码
	 */
	private String password;
	
	/**
	 * 盐
	 */
	private String salt;
	

	/**
	 * 维度及维度值
	 */
	private Map<String,List<KeyValuePairVO>> dimensions = new HashMap<String,List<KeyValuePairVO>>();

	public UserVO(){}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Date getExpireDate() {
		return expireDate;
	}

	public void setExpireDate(Date expireDate) {
		this.expireDate = expireDate;
	}

	public Boolean getEnabled() {
		return enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	public Boolean getDeleted() {
		return deleted;
	}

	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	public Long getProgramId() {
		return programId;
	}

	public void setProgramId(Long programId) {
		this.programId = programId;
	}

	public Map<String, List<KeyValuePairVO>> getDimensions() {
		return dimensions;
	}

	public void setDimensions(Map<String, List<KeyValuePairVO>> dimensions) {
		this.dimensions = dimensions;
	}
	
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}
}
